home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / program / 16 / vdibind.fth < prev    next >
Text File  |  1985-11-19  |  17KB  |  467 lines

  1. \ GEM VDI bindings
  2.  
  3. \ Written by Jesse Taylor.
  4.  
  5. \ These bindings try to conform to the bindings that are outlined in the
  6. \ digital research gem vdi manual.  The bindings that are outlined in the
  7. \ VDI manual are written in the 'C' programming language.  Although FORTH is
  8. \ similar to 'C', there are some things that FORTH does different from 'C'.  
  9. \ As a consequence there are some small differences between the 'C' and the
  10. \ FORTH VDI bindings.  These differences are pointed out where they exist.
  11.  
  12. \ Control Functions
  13.  
  14. : open-station ( work_in[11], &handle, work_out[57] -- )
  15.    11 #intin!  #ptsinoff  
  16.    vdi-block  2dup  swap 90 + swap  16 + !  12 + !
  17.    swap  vdi-block  4+ !  callvdi
  18.    6 contrl@  swap !  intin-buf !pba-intin  ptsin-buf !pba-ptsin
  19. ;
  20. : v_opnwk ( work_in[11], &handle, work_out[57] -- )
  21.    1 set-op  open-station
  22. ;
  23. : v_clswk ( handle -- )
  24.    2 set-op  6 contrl!  callvdi
  25. ;
  26. : v_opnvwk ( work_in[11], &handle, work_out[57] -- )
  27.    100 set-op  open-station
  28. ;
  29. : v_clsvwk ( handle -- )
  30.    2 set-op  #dev!  callvdi
  31. ;
  32. : v_clrwk ( handle -- )
  33.    #dev!  #pt-intinoff  3 set-op  callvdi
  34. ;
  35. : v_updwk ( handle -- )
  36.    4 set-op  #pt-intinoff  #dev!  callvdi
  37. ;
  38. : vst_load_fonts ( handle select -- additional )
  39.    119 set-op  #ptsinoff  1 #intin!  0 intin!  #dev!  callvdi   0 intout@
  40. ;
  41. : vst_unload_fonts ( handle select -- )
  42.    120 set-op  #ptsinoff  1 #intin!  0 intin!  #dev!  callvdi
  43. ;
  44. : vs_clip ( handle clip_flag pxyarray -- )
  45.    129 set-op  1 #intin!  2 #ptsin!  !pba-ptsin  0 intin!  #dev!  callvdi
  46.    ptsin-buf !pba-ptsin
  47. ;
  48.  
  49. \ Output Functions
  50.  
  51. : v_pline ( handle count pxyarray -- )
  52.    6 set-op  #intinoff  !pba-ptsin  #ptsin!  #dev!  callvdi
  53.    ptsin-buf !pba-ptsin
  54. ;
  55. : v_pmarker ( handle count pxyarray -- )
  56.    7 set-op  #intinoff  !pba-ptsin  #dev!  callvdi  ptsin-buf !pba-ptsin
  57. ;
  58. : v_gtext ( handle x y string -- )
  59. \ !!! WARNING !!!  the string parameter in this routine is a Forth string
  60. \ not a 'C' string.  This means that this is a string that contains a leading
  61. \ length byte.  A 'C' string has no length byte, but it is null terminated.
  62. \ You do not need to put a null character at the end of your string.
  63.  
  64.    count dup  1+  #intin!  tuck  0
  65.    do   dup i +  c@  i intin!  1+   loop
  66.    drop   1+  0 swap intin!
  67.    8 set-op   1 #ptsin!   0 ptsin!  #dev!  callvdi
  68. ;
  69. : v_fillarea ( handle count pxyarray -- )
  70.    9 set-op  #intinoff  !pba-ptsin  #ptsin!  #dev!  callvdi  ptsin-buf !pba-ptsin
  71. ;
  72. : v_cellarray ( handle, pxyarray, row_length, el_used, num_rows, wrt_mode,
  73.    colarray celarray_length )
  74. \ !!! WARNING !!!  This routine had to be modified.  The last input value is a 
  75. \ new addition to the cellarray routine.  It is the length of the
  76. \ color index array in words
  77.    10 set-op  #intin!  !pba-intin  10 contrl!  9 contrl!  8 contrl!  7 contrl!
  78.    !pba-ptsin  2 #ptsin!  #dev!  callvdi
  79.    intin-buf !pba-intin  ptsin-buf !pba-ptsin
  80. ;
  81. : v_contourfill ( handle, x, y, index )
  82.    103 set-op  1 #intin!  1 #ptsin!  0 intin!  0 ptsin!  #dev!  callvdi
  83. ;
  84. : vr_recfl ( handle, pxarray )
  85.    114 set-op  2 #ptsin!  0 #intin!  !pba-ptsin  #dev!  callvdi
  86.    ptsin-buf !pba-ptsin
  87. ;
  88. : v_bar ( handle, pxarray )
  89.    11 set-op  !pba-ptsin  #dev!  1 5 contrl!  2 #ptsin!  #intinoff  callvdi
  90.    ptsin-buf !pba-ptsin
  91. ;
  92. : v_arc ( handle, x, y, radius, begang, endang )
  93.    11 set-op  4 #ptsin! 2 #intin!  2 5 contrl!   
  94.    1 intin!  0 intin!  6 ptsin[] w!  0 ptsin!  #dev! 0 0 2dup  2 ptsin!
  95.    4 ptsin!  callvdi
  96. ;
  97. : v_pieslice ( handle, x, y, radius, begang, endang )
  98.    11 set-op  4 #ptsin! 2 #intin!  3 5 contrl!   
  99.    1 intin!  0 intin!  6 ptsin[] w!  0 ptsin!  #dev! 0 0 2dup  2 ptsin!
  100.    4 ptsin!  0 7 ptsin[] w!  callvdi
  101. ;
  102. : v_circle ( handle, x, y, radius )
  103.    11 set-op   #intinoff  3 #ptsin!  4 5 contrl!  4 ptsin[] w!  0 ptsin!
  104.    0 0 2 ptsin!  0 5 ptsin[] w!  #dev!  callvdi
  105. ;
  106. : v_ellarc ( handle, x, y, xradius, yradius, begang, endang )
  107.    11 set-op  2 #ptsin!  2 #intin!  6 5 contrl!   
  108.    1 intin!  0 intin!  2 ptsin!  0 ptsin!  #dev!  callvdi
  109. ;
  110. : v_ellpie ( handle, x, y, xradius, yradius, begang, endang )
  111.    11 set-op  2 #ptsin!  2 #intin!  7 5 contrl!   
  112.    1 intin!  0 intin!  2 ptsin!  0 ptsin!  #dev!  callvdi
  113. ;
  114. : v_ellipse ( handle, x, y, xradius, yradius )
  115.    11 set-op  2 #ptsin!  #intinoff  5 5 contrl!  2 ptsin!  0 ptsin!  #dev!
  116.    callvdi
  117. ;
  118. : v_rbox ( handle, xyarray )
  119.    11 set-op  8 5 contrl!  2 #ptsin!  0 #intin!  !pba-ptsin  #dev!  callvdi
  120.    ptsin-buf !pba-ptsin
  121. ;
  122. : v_rfbox ( handle, xyarray )
  123.    11 set-op  9 5 contrl!  2 #ptsin!  0 #intin!  !pba-ptsin  #dev!  callvdi
  124.    ptsin-buf !pba-ptsin
  125. ;
  126. : v_justified ( handle, x, y, string, length, word_space, char_space )
  127. \ !!! WARNING !!!  the string parameter in this routine is a forth string
  128. \ not a 'C' string.  This means that this is a string that contains a leading
  129. \ length byte.  A 'C' string has no length byte, but it is null terminated.
  130. \ You do not need to put a null character at the end of your string.
  131.  
  132.    11 set-op  10 5 contrl!  2 #ptsin!   1 intin!  0 intin!  0 2 ptsin!
  133.    count dup 3 +  #intin!  tuck  0
  134.     do   dup i +  c@  i 2+ intin!  1+   loop  drop   3 +  0 swap intin!
  135.    0 ptsin!  #dev!  callvdi
  136. ;
  137.  
  138. \ Attribute Functions
  139.  
  140. : set-one ( handle, value, op# -- actual_value_selected )
  141.    set-op  #ptsinoff  1 #intin!  0 intin!  #dev!  callvdi  0 intout@
  142. ;
  143. : vswr_mode ( handle, mode -- mode_selected )
  144.    32 set-one
  145. ;
  146. : vs_color ( handle, index, rgb_in )
  147.    14 set-op  #ptsinoff  4 #intin!  
  148.    dup     w@  1 intin!  
  149.    dup 2+  w@  2 intin!  
  150.    dup 4+  w@  3 intin!  
  151.    0 intin!
  152.    #dev!  callvdi
  153. ;
  154. : vsl_type ( handle, style -- type_actualy_set )
  155.    15 set-one
  156. ;
  157. : vsl_udsty ( handle, pattern )
  158.    113 set-op  #ptsinoff  1 #intin!  0 intin!  #dev!  callvdi 
  159. ;
  160. : vsl_width ( handle, width -- width_actualy_set )
  161.    16 set-op  1 #ptsin!  #intinoff  0 0 ptsin!  #dev!  callvdi  0 ptsout[] w@
  162. ;
  163. : vsl_color ( handle, color_index -- color_actualy_set )
  164.    17 set-one
  165. ;
  166. : vsl_ends ( handle, beg_style, end_style )
  167.    108 set-op  #ptsinoff  2 #intin!  1 intin!  0 intin!  #dev!  callvdi
  168. ;
  169. : vsm_type ( handle, style -- type_actualy_set )
  170.    18 set-one
  171. ;
  172. : vsm_height ( handle, height -- actual_set_height )
  173.    19 set-op  1 #ptsin!  #intinoff  0 swap  0 ptsin!  #dev!  callvdi
  174.    1 ptsout[] w@
  175. ;
  176. : vsm_color ( handle, color_index -- actual_color_selected )
  177.    20 set-one
  178. ;
  179. : vsr_height ( handle, height, &char_width, &char_height, &cell_width
  180.  &cell_height )
  181.    12 set-op  1 #ptsin!  #intinoff  0 5 pick  0 ptsin!  5 pick  #dev!  callvdi
  182.    3 ptsout[] w@  swap !  2 ptsout[] w@  swap !
  183.    1 ptsout[] w@  swap !  0 ptsout[] w@  swap !  2drop
  184. ;
  185. : vst_point ( handle, point, &char_width, &char_height, &cell_width
  186.  &cell_height )
  187.    107 set-op  1 #intin!  #ptsinoff  4 pick  0 intin!  5 pick  #dev!  callvdi
  188.    3 ptsout[] w@  swap !  2 ptsout[] w@  swap !
  189.    1 ptsout[] w@  swap !  0 ptsout[] w@  swap !  2drop
  190. ;
  191. : vst_rotation ( handle, angle -- actual_angle_selected )
  192.    13 set-one
  193. ;
  194. : vst_font ( handle, font -- actual_font_selected )
  195.    21 set-one
  196. ;
  197. : vst_color ( handle, color -- actual_color_selected )
  198.    22 set-one
  199. ;
  200. : vst_effects ( handle, effect -- actual_effect_selected )
  201.    21 set-one
  202. ;
  203. : vst_alignment ( handle, hor_in, vert_in, &hor_out, &vert_out )
  204.    39 set-op  #ptsinoff  2 #intin!  2swap  1 intin!  0 intin!  rot #dev!  callvdi
  205.    1 intout@  swap !  0 intout@  swap !
  206. ;
  207. : vsf_interior ( handle, style -- actual_style_selected )
  208.    23 set-one
  209. ;
  210. : vsf_style ( handle, style_index -- actual_style_selected )
  211.    24 set-one
  212. ;
  213. : vsf_color ( handle, color_index -- actual_style_selected )
  214.    25 set-one
  215. ;
  216. : vsf_perimeter ( handle, per_vis -- actual_perimeter_selected )
  217.    104 set-one
  218. ;
  219. : vsf_udpat ( handle, pfill_pat, planes )
  220.    112 set-op  #ptsinoff  16 *  #intin!  !pba-intin  #dev!  callvdi
  221.    intin-buf !pba-intin
  222. ;
  223.  
  224. \ Raster Operations
  225.  
  226. : vro_cpyfm ( handle, wr_mode, pxyarray, psrcMFDB, pdesMFDB )
  227.    109 set-op  4 #ptsin!  1 #intin!  9 contrl[] !  7 contrl[] !  !pba-ptsin
  228.    0 intin!  #dev!  callvdi   ptsin-buf  !pba-ptsin
  229. ;
  230. : vrt_cpyfm ( handle, wr_mode, pxyarray, psrcMFDB, pdesMFDB, color_index[2] )
  231.    121 set-op  4 #ptsin!  3 #intin!  @  1 ptsin[] !  
  232.    9 contrl[] !  7 contrl[] !  !pba-ptsin
  233.    0 intin!  #dev!  callvdi   ptsin-buf  !pba-ptsin
  234. ;
  235. : vr_trnfm ( handle, psrcMFDB, pdesMFDB )
  236.    110 set-op  #intinoff  #ptsinoff  9 contrl[] !  7 contrl[] !  #dev!  callvdi
  237. ;
  238. : v_get_pixel ( handle, x, y, *pel, *index )
  239.    105 set-op  1 #ptsin!  #intinoff  2swap  0 ptsin! rot #dev!  callvdi
  240.    1 intout@  swap !  0 intout@  swap !
  241. ;
  242.  
  243. \ Input Functions
  244.  
  245. : vsin_mode ( handle, dev_type, mode )
  246.    33 set-op  #ptsinoff  2 #intin!  1 intin!  0 intin!  #dev!  callvdi
  247. ;
  248. : vrq_locator ( handle, x, y, &xout, &yout, &term )
  249.    28 set-op  1 #ptsin!  #intinoff  2rot  5 pick  0 ptsin!  #dev!  callvdi
  250.    0 intout@ swap !  1 ptsout[] w@ swap !  0 ptsout[] w@  swap !  drop
  251. ;
  252. : vsm_locator ( handle, x, y, &xout, &yout, &term -- status )
  253.    28 set-op  1 #ptsin!  #intinoff  2rot  5 pick  0 ptsin!  #dev!  callvdi
  254.    0 intout@ swap !  1 ptsout[] w@ swap !  0 ptsout[] w@  swap !  drop
  255.    2 contrl@  0<>  4 contrl@  0<> or
  256. ;
  257. : vrq_valuator ( handle, val_in, &val_out, &term, &status )
  258.    29 set-op  #ptsinoff  1 #intin!  0 2rot  0 intin!  #dev! drop  callvdi
  259.    4 contrl@  swap !  1 intout@ swap !  0 intout@  swap !
  260. ;
  261. : vrq_choice ( handle, ch_in, &ch_out )
  262.    30 set-op  #ptsinoff  1 #intin!  -rot  0 intin!  #dev! callvdi
  263.    0 intout@ swap !
  264. ;
  265. : vsm_choice ( handle, &choice )
  266.    30 set-op  #ptsinoff  #intinoff  swap  #dev! callvdi
  267.    0 intout@ swap !  4 contrl@
  268. ;
  269. : vrq_string ( handle, max_length, echo_mode, echo_xy[2], &string )
  270.    31 set-op  1 #ptsin!  2 #intin!  >r  @  0 ptsin[] !  1 intin!  0 intin!
  271.    #dev!  callvdi  4 contrl@  1-  dup  r@  c!  r> 1+  swap  0 
  272.     do   i intout@  over c!  1+   loop
  273. ;
  274. : vsm_string ( handle, max_length, echo_mode, echo_xy[2], &string -- status )
  275.    31 set-op  1 #ptsin!  2 #intin!  >r  @  0 ptsin[] !  1 intin!  0 intin!
  276.    #dev!  callvdi  4 contrl@  1-  dup  r@  c!  r> 1+  swap  0 
  277.     do   i intout@  over c!  1+   loop  4 contrl@
  278. ;
  279. : vsc_form ( handle, pcur_form[36] )
  280.    111 set-op  #ptsinoff  37 #intin!  !pba-intin  #dev!  callvdi
  281. ;
  282. : vex_timv ( handle, tim_addr, *otim_addr, &tim_conv )
  283.    118 set-op  #intinoff  #ptsinoff  2swap  7 contrl[] !  #dev!  callvdi
  284.    0 intout@  swap !  9 contrl[] @ swap !
  285. ;
  286. : v_show_c ( handle, reset )
  287.    122 set-op  #ptsinoff  1 #intin!  0 intin!  #dev!  callvdi
  288. ;
  289. : v_hide_c ( handle )
  290.    123 set-op  #dev!  #intinoff  #ptsinoff  callvdi
  291. ;
  292. : vq_mouse ( handle, &pstatus, &x, &y )
  293.    124 set-op  #intinoff  #ptsinoff  3 pick  #dev!  callvdi
  294.    0 ptsout@  rot !  swap !  0 intout@  swap !  drop
  295. ;
  296. : vex_butv ( handle, *pusrcode, *psavcode, )
  297.    125 set-op  #intinoff  #ptsinoff  swap  7 contrl[] !  swap #dev!  callvdi
  298.    9 contrl[] @ swap !
  299. ;
  300. : vex_motv ( handle, *pusrcode, *psavcode, )
  301.    126 set-op  #intinoff  #ptsinoff  swap  7 contrl[] !  swap #dev!  callvdi
  302.    9 contrl[] @ swap !
  303. ;
  304. : vex_curv ( handle, *pusrcode, *psavcode, )
  305.    127 set-op  #intinoff  #ptsinoff  swap  7 contrl[] !  swap #dev!  callvdi
  306.    9 contrl[] @ swap !
  307. ;
  308. : vq_key_s ( handle, &pstatus )
  309.    128 set-op  #intinoff  #ptsinoff  swap #dev!  callvdi  0 intout@ swap  !
  310. ;
  311.  
  312. \ Inquire Functions
  313.  
  314. : vq_extend ( handle, owflag, work_out )
  315.    102 set-op  #ptsinoff  1 #intin!  dup  !pba-intout  90 + vdi-block 16 + !
  316.    0 intin!  #dev!  callvdi  ptsout-buf !pba-ptsout  intout-buf !pba-intout
  317. ;
  318. : vq_color ( handle, color_index, set_flag, rgb[3] )
  319.    26 set-op  #ptsinoff  2 #intin!  swap  1 intin!  swap  0 intin!  swap  #dev!
  320.    callvdi  1 intout[] swap  6 cmove
  321. ;
  322. : vql_attributes ( handle, attrib[4] )
  323.    35 set-op  #intinoff  #ptsinoff swap  #dev!  callvdi  0 ptsout[] w@
  324.    over 6 + w!  intout-buf  swap  6 cmove
  325. ;
  326. : vqm_attributes ( handle, attrib[4] )
  327.    36 set-op  #intinoff  #ptsinoff swap  #dev!  callvdi  1 ptsout[] w@  over 6 +
  328.    w!  intout-buf  swap  6 cmove
  329. ;
  330. : vqf_attributes ( handle, attrib[4] )
  331.    37 set-op  #intinoff  #ptsinoff  swap #dev!  callvdi  intout-buf 2@  rot 2!
  332. ;
  333. : vqt_attributes ( handle, attrib[10] )
  334.    38 set-op  #intinoff  #ptsinoff  swap  #dev!  callvdi
  335.    dup  intout-buf  swap  12  cmove  ptsout-buf  swap  12 + 8 cmove
  336. ;
  337. : vqt_extent ( handle, string, extent[8] )
  338.    116 set-op  #ptsinoff  swap count  dup 1+ dup >r #intin! 0
  339.     do   dup  c@  i intin!  1+   loop   drop
  340.    r>  0 swap intin-buf + c!  !pba-ptsout  #dev!  callvdi
  341.    ptsout-buf !pba-ptsout
  342. ;
  343. : vqt_width ( handle, character, &cell_width, &left_delta, &right_delta -- 
  344.  status )
  345.    117 set-op  #ptsinoff  1 #intin!  0 2rot  0 intin!  #dev!  callvdi
  346.    drop  4 ptsout[] w@  swap !  2 ptsout[] w@  swap !  ptsout-buf w@  swap !
  347.    0 intout@
  348. ;
  349. : vqt_name ( handle, element_num, name[32] -- index )
  350.    130 set-op  1 #intin!  #ptsinoff  >r  0 intin!  #dev!  callvdi  r>
  351.    1 intout[] swap 64 cmove  0 intout@
  352. ;
  353. : vqt_fontinfo ( handle, &minADE, &maxADE, distances, &maxwidth, effects[3] )
  354.    131 set-op  #intinoff  #ptsinoff  5 pick #dev!  callvdi  
  355.    2 ptsout[] swap  6 cmove  ptsout-buf w@  swap !  9 1
  356.     do   i ptsout[] w@  over w! 2+   2 +loop  drop
  357.    1 intout@  swap !  0 intout@  swap !  drop
  358. ;
  359. : vq_cellarray ( handle, pxyarray, row_length, num_rows, &el_used, &rows_used
  360.  &status, colarray[n] )
  361.    27 set-op  2 #ptsin!  #intinoff  2rot  8 contrl[] w!  7 contrl[] w!
  362.    2rot  !pba-ptsin  #dev!  !pba-intout  callvdi 
  363.    11 contrl@  swap !  10 contrl@ swap !  9 contrl@ swap !
  364.    ptsin-buf  !pba-ptsin  intout-buf !pba-intout
  365. ;
  366. : vqin_mode ( handle, dev_type, &input_mode )
  367.    115 set-op  #ptsinoff  1 #intin!  swap  0 intin!  swap  #dev!  callvdi 
  368.    0 intout@  swap !
  369. ;
  370.  
  371. \ Escapes
  372.  
  373. : esc-init  ( handle, function# -- )
  374.    5 set-op  5 contrl[] w!  #dev!
  375. ;
  376. : vq_chcells ( handle, &rows, &columns )
  377.    rot  1  esc-init  callvdi  1 intout@  swap !  0 intout@ swap !
  378. ;
  379. : v_exit_cur ( handle )
  380.    2 esc-init  callvdi
  381. ;
  382. : v_enter_cur ( handle )
  383.    3 esc-init  callvdi
  384. ;
  385. : v_curup ( handle )
  386.    4 esc-init  callvdi
  387. ;
  388. : v_curdown ( handle )
  389.    5 esc-init  callvdi
  390. ;
  391. : v_curright ( handle )
  392.    6 esc-init  callvdi
  393. ;
  394. : v_curleft ( handle )
  395.    7 esc-init  callvdi
  396. ;
  397. : v_curhome ( handle )
  398.    8 esc-init  callvdi
  399. ;
  400. : v_eeos ( handle )
  401.    9 esc-init  callvdi
  402. ;
  403. : v_eeol ( handle )
  404.    10 esc-init  callvdi
  405. ;
  406. : vs_curaddress ( handle, row, collumn )
  407.    rot  11 esc-init  2 #intin!  1 intin!  0 intin!  callvdi
  408. ;
  409. : v_curtext ( handle &string )
  410.    count  dup #intin!   0
  411.     do   dup  c@  i intin! 1+   loop  drop  
  412.    #dev! 12 5 contrl[] w!  #ptsinoff  5 set-op  callvdi
  413. ;
  414. : v_rvon ( handle )
  415.    13 esc-init  callvdi
  416. ;
  417. : v_rvoff ( handle )
  418.    14 esc-init  callvdi
  419. ;
  420. : vq_curaddress ( handle, &row, &column )
  421.    rot 15 esc-init  callvdi  1 intout@ swap !  0 intout@ swap !
  422. ;
  423. : vq_tabstatus ( handle -- status )
  424.    16 esc-init  callvdi  0 intout@
  425. ;
  426. : v_hardcopy ( handle )
  427.    17 esc-init  callvdi
  428. ;
  429. : v_dspcur ( handle x, y )
  430.    rot 18 esc-init  1 #ptsin!  0 ptsin!  callvdi
  431. ;
  432. : v_rmcur ( handle )
  433.    19 esc-init  callvdi
  434. ;
  435. : v_form_adv ( handle )
  436.    20 esc-init  callvdi
  437. ;
  438. : v_output_window ( handle, xyarray[4] )
  439.    5 set-op swap  #dev!  21 5 contrl!  #intinoff  2 #ptsin!  ptsin-buf
  440.    8 cmove  callvdi
  441. ;
  442. : v_clear_disp_list ( handle )
  443.    22 esc-init  callvdi
  444. ;
  445. : v_bit_image ( handle, filename, aspect, x_scale, y_scale, h_align, y_align,
  446.  xyarray )
  447.    5 set-op  2 #ptsin!  ptsin-buf 8 cmove  4 intin!  3 intin!  2 intin!
  448.    1 intin!  0 intin!  count dup  6 +  #intin!  0
  449.     do   dup c@  i 5 + intin!  1+   loop  drop  3 contrl@  0 swap  intin!
  450.    #dev!  callvdi
  451. ;
  452. : v_meta_extents ( handle, min_x, min_y, max_x, max_y )
  453.    5 set-op  98 5 contrl!  2 ptsin!  0 ptsin!  #dev!  2 #ptsin! #intinoff
  454.    callvdi
  455. ;
  456. : v_write_meta ( handle, num_intin, intin, num_ptsin, ptsin )
  457.    5 set-op  99 5 contrl!  
  458.    !pba-ptsin  #ptsin!  !pba-intin  #intin!  #dev!  callvdi
  459.    ptsin-buf !pba-ptsin  intin-buf !pba-intin
  460. ;
  461. : vm_filename ( handle, filename )
  462.    5 set-op  100 5 contrl!  #ptsinoff  count dup 1+ dup #intin!
  463.    0 swap intin! 0
  464.     do   dup  c@  i intin!  1+   loop  drop  #dev!  callvdi
  465. ;
  466. \ These bindings try to conform to the bindings that are outlined in the